Event Handling with Method in React JS